
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
Using the DirectConnect interface</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="connpbp73.htm">Previous</A>&nbsp;&nbsp;<A HREF="connpbp75.htm" >Next</A>
<!-- End Header -->
<A NAME="CIHIEDDC"></A><h1>Using the DirectConnect interface</h1>
<A NAME="TI1540"></A><p>The DirectConnect interface uses Sybase's Open Client
CT-Library (CT-Lib) API to access a database through Sybase
middleware data access products such as the DirectConnect for OS/390
component of MainFrame Connect and Open ServerConnect&#153;.</p>
<A NAME="TI1541"></A><h4>Accessing Unicode data</h4>
<A NAME="TI1542"></A><p>PowerBuilder can connect, save, and retrieve data in both ANSI/DBCS and
Unicode databases. When character data or command text is sent to the
database, PowerBuilder sends a DBCS string if the UTF8 database parameter
is set to 0 (the default). If UTF8 is set to 1, PowerBuilder sends a
UTF-8 string.</p>
<A NAME="TI1543"></A><p>The database server must have the UTF-8 character set installed.
See the description of the UTF-8 database parameter in the online
Help for more information.</p>
<A NAME="TI1544"></A><p>A Unicode database is a database whose character set is set
to a Unicode format, such as UTF-8, UTF-16, UCS-2, or UCS-4. All
data must be in Unicode format, and any data saved to the database
must be converted to Unicode data implicitly or explicitly.</p>
<A NAME="TI1545"></A><p>A database that uses ANSI (or DBCS) as its character set might
use special datatypes to store Unicode data. Columns with these
datatypes can store <i>only</i> Unicode data. Any
data saved into such a column must be converted to Unicode explicitly.
This conversion must be handled by the database server or client.</p>
<A NAME="TI1546"></A><h2>Connecting through the DirectConnect middleware
product</h2>
<A NAME="TI1547"></A><p>Sybase DirectConnect is a data access server that provides
a standardized middleware interface between your applications and
your enterprise data sources. Data access services to a particular
database are defined in a DirectConnect server. Since a DirectConnect
server can support multiple access services, you can access multiple
databases through a single server.</p>
<A NAME="TI1548"></A><p>When you use the DirectConnect interface to connect to a particular
database, your connection is routed through the access service for
that database. An access service consists of a named set of configuration
properties and a specific access service library. </p>
<A NAME="TI1549"></A><p>To access DB2 data on an IBM mainframe through a DirectConnect
server, you can use the DirectConnect interface to connect through
either a DirectConnect for MVS access service or a DirectConnect
Transaction Router Service (TRS). </p>
<A NAME="TI1550"></A><p>TRS provides fast access to a DB2/MVS database by
using remote stored procedures. The DirectConnect interface supports
both versions of the TRS library: TRSLU62 and TRSTCP. </p>
<A NAME="TI1551"></A><p>The DirectConnect server operates in two modes: <ACRONYM title = "sequel" >SQL</ACRONYM> transformation and passthrough.
The DirectConnect interface for DB2/MVS uses passthrough mode,
which allows your PowerBuilder application to have direct access to
the capabilities of the DB2/MVS data source.</p>
<A NAME="TI1552"></A><h2>Connecting through the Open ServerConnect middleware
product</h2>
<A NAME="TI1553"></A><p>Sybase's Open ServerConnect supports mainframe applications
that retrieve and update data stored on the mainframe that Sybase
client applications can execute. Client applications can connect
directly to a DB2/MVS database through an Open ServerConnect
application residing on the mainframe, eliminating the need for
an intermediate gateway like DirectConnect. (This type of connection
is also known as a <i>gateway-less</i> connection.)
In addition, an Open ServerConnect application presents mainframe
Remote Procedure Calls (RPCs) as database stored procedures to the
client application. </p>
<A NAME="TI1554"></A><p>To access DB2 data on an IBM mainframe through Open ServerConnect,
you can use the DirectConnect interface to connect through Open
ServerConnect for IMS and MVS. </p>
<A NAME="TI1555"></A><h2>Selecting the type of connection</h2>
<A NAME="TI1556"></A><p>To select how PowerBuilder accesses the database, use the Choose
Gateway drop-down list on the Connection tab of the DirectConnect
Database Profile Setup dialog box and select one of the following:<A NAME="TI1557"></A>
<ul>
<li class=fi>Access Service</li>
<li class=ds>Gatewayless</li>
<li class=ds>TRS
</li>
</ul>
</p>
<A NAME="TI1558"></A><p>All the DBParm parameters defined for the DirectConnect interface
are applicable to all three connections except the following: <A NAME="TI1559"></A>
<ul>
<li class=fi>HostReqOwner applies to Access
Service and Gatewayless only</li>
<li class=ds>Request, ShowWarnings, and SystemOwner apply to
Access Service only</li>
<li class=ds>UseProcSyntax applies to Gatewayless only
</li>
</ul>
</p>
<A NAME="TI1560"></A><p>See the online help for the complete list of DBParm parameters
applicable to the DirectConnect interface.</p>

